Auto merge of #5462 - matklad:install-releases, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 2 May 2018 23:52:15 +0000 (23:52 +0000)
committerbors <bors@rust-lang.org>
Wed, 2 May 2018 23:52:15 +0000 (23:52 +0000)
commit6cd841fe4a55d21d8f9a74102e86acb9475d45da
tree39f8cb78439b932b041d28f211e2a865efcdbb56
parent5db0d51279a7c0ca79aa05525c296868f9d41449
parent658343aa10e3c458a5e54aa2612f09893390014e
Auto merge of #5462 - matklad:install-releases, r=alexcrichton

Don't install pre-releases by default

Currently, `cargo install` will try to install a pre-release version, if available (try `cargo install rand`). This happens because we use `VersionReq::any`, if no version is specified, and that matches pre-releases. The fix is to use `*`, which is different from `any`.

This needs to be done in `cargo install`, and not directly in `parse_no_deprecated`, the latter would be wrong, as demonstrated by a new test with patch.